const mutations = {
  // 保存cookie
  saveCookie(state, cookie) {
    state.cookie = null
    state.cookie = cookie
  },
  // 保存当前用户信息
  saveProfile(state, profile) {
    state.profile = null
    state.profile = profile;
  },
  // 保存歌单信息
  saveSongList(state, songList) {
    state.songList = null
    state.songList = songList
  },
  // 保存歌曲信息
  saveSong(state, songs) {
    state.songs = null
    state.songs = songs
  },
  // 当前播放的歌曲以及歌曲信息
  saveNowSong(state, nowPlaySong) {
    state.nowPlaySong = null
    state.nowPlaySong = nowPlaySong
  },
  // 上一首歌
  savePreSong(state, preSong) {
    state.preSong = null
    state.preSong = preSong
  },
  // 点击播放按钮
  clickPlay(state, ifPlay) {
    state.ifPlay = null
    state.ifPlay = ifPlay
  },
  // 每日推荐歌单
  saveDailyRec(state, dailyRec) {
    state.DailyRec = null
    state.DailyRec = dailyRec
  },
  // 当前歌单的id
  saveNowId(state, nowID) {
    state.nowID = null
    state.nowID = nowID
  },
  // 用户当前选择的歌曲的汇总
  saveNowSongCount(state, nowSongCount) {
    state.nowSongCount = null
    state.nowSongCount = nowSongCount
  },
  // 专辑明细
  saveAlbumData(state, albumData) {
    state.albumData = null
    state.albumData = albumData
  },
  // 保存搜索出来的明细
  saveSeachSongItem(state, seachItem) {
    state.seachSongItem = null
    state.seachSongItem = seachItem
  },
  // 选择了歌手页面中类似歌手后的处理
  saveResArtists(state, resArtists) {
    state.resArtists = null
    state.resArtists = resArtists
  },
  // 存入搜索到的歌曲
  saveSeachSong(state, seachSong) {
    state.seachSong = null
    state.seachSong = seachSong
  },
  // 存入歌手详情
  saveArtistsItem(state, artistsItem) {
    state.artistsItem = null
    state.artistsItem = artistsItem
  },
  // MV播放地址
  saveMVurl(state, mvUrl) {
    state.mvUrl = null
    state.mvUrl = mvUrl
  },
  // 相似MV
  saveResMv(state, resMv) {
    state.resMv = null
    state.resMv = resMv
  },
  // 存入MV基础信息
  saveMvBes(state, mvBes) {
    state.mvBes = null
    state.mvBes = mvBes
  },
  // 视频播放地址
  saveVurl(state, vUrl) {
    state.vUrl = null
    state.vUrl = vUrl
  },
  // 相似视频
  saveResv(state, resV) {
    state.resV = null
    state.resV = resV
  },
  // 视频基础信息
  saveVbes(state, vBes) {
    state.vBes = null
    state.vBes = vBes
  },
  // 音乐是否暂停
  ifPause(state, pause) {
    state.pause = null
    state.pause = pause
  },
  // 当前播放时间
  savePlayTime(state, playTime) {
    state.playTime = null
    state.playTime = playTime
  },
  // 是否打开歌曲播放页面
  saveOpenItem(state, openItem) {
    state.openItem = null
    state.openItem = openItem
  },
  // 存入用户歌单
  saveUserList(state, userList) {
    state.userList = null
    state.userList = userList
  },
  // 当前选中行
  saveNowRow(state, nowRow) {
    state.nowRow = null
    state.nowRow = nowRow
  },
  // 喜欢的歌曲
  savelikeData(state, likeData) {
    state.likeDatas = null
    state.likeDatas = likeData
  },
  // 收藏的歌单
  saveSubList(state, subList) {
    state.subList = null
    state.subList = subList
  },
  // 用户信息发生改变
  saveChange(state, change) {
    state.change = null
    state.change = change
  },
  PUSH_CANCEL(state, payload) {
    state.cancelTokenArr.push(payload.cancelToken);
  },
  CLAER_CANCEL({ cancelTokenArr }) {
    cancelTokenArr.forEach((item) => {
      item('路由跳转取消请求');
    });
    cancelTokenArr = [];
  },
  // 用户id（为了看个人中心,非私人）
  saveUserId(state, userid) {
    state.userid = userid
  },
}
export default mutations
